﻿using System;

namespace Sushi.Core
{
	///<summary>
	/// An empty exception class used to differentiate user thrown exceptions
	/// from system exceptions. User thrown exceptions should be of this type 
	/// and will be passed to the used in the proper way according to the SUSHI
	/// specification. Of course, system level exceptions should not be passed to 
	/// the end user.
	///</summary>

[Serializable]
public class SushiServiceException : System.Exception
{
	///<summary>
	///</summary>
	public SushiServiceException() : base("Unexpected SUSHI Service Exception."){}
   ///<summary>
   ///</summary>
   ///<param name="message"></param>
   public SushiServiceException(string message): base(message){}
	///<summary>
	///</summary>
	///<param name="message"></param>
	///<param name="inner"></param>
	public SushiServiceException(string message, System.Exception inner) : base(message, inner) {}

    // Constructor needed for serialization 
    // when exception propagates from a remoting server to the client.
	///<summary>
	///</summary>
	///<param name="info"></param>
	///<param name="context"></param>
	protected SushiServiceException(System.Runtime.Serialization.SerializationInfo info,
        System.Runtime.Serialization.StreamingContext context):base(info, context){}
}

}
